package com.cj.pojo;

public enum CommentStatus {
    PENDING("pending"),
    PUBLISHED("published"),
    DELETED("deleted");

    private final String value;

    CommentStatus(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static CommentStatus fromValue(String value) {
        for (CommentStatus status : CommentStatus.values()) {
            if (status.value.equals(value)) {
                return status;
            }
        }
        throw new IllegalArgumentException("Invalid CommentStatus value: " + value);
    }
}
